import java.util.Scanner;
public class Test2_20230807 {
    public static int JieChengHe ( int a){
        int tem = 0;
        for (int i = 1; i <= a; i++) {
            int sub = 1;
            for (int j = 1; j <= i; j++) {
                sub *= j;
            }
            tem += sub;
        }
        return tem;
    }
    public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int a = scanner.nextInt();
    int b = JieChengHe(a);
    System.out.println(b);
}
}
